<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRecruidListsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('recruid_lists', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('recruit_category_id')->comment('职位类别')->index();
            $table->string('name')->comment('职位名称')->index();
            $table->string('address')->comment('工作地点')->index();
            $table->string('recruit_number')->comment('招聘人数');
            $table->unsignedInteger('number')->default(1)->comment('显示顺序')->index();
            $table->json('info')->nullable()->comment('详情');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('recruid_lists');
    }
}
